﻿
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using SMARTHOTEL.SMSTextMessage;
using Volo.Abp.AutoMapper;
using Volo.Abp.Modularity;
using Volo.Abp.SettingManagement;
using Volo.Abp.Settings;
using AutoMapper; // 添加此命名空间
namespace SMARTHOTEL;

[DependsOn(
    typeof(SMARTHOTELDomainModule),
    typeof(SMARTHOTELApplicationContractsModule),
    typeof(AbpSettingManagementApplicationModule),
    typeof(AbpAutoMapperModule), // 必须显式添加
    typeof(AbpAutoMapperModule)
)]
public class SMARTHOTELApplicationModule : AbpModule
{
    public override void ConfigureServices(ServiceConfigurationContext context)
    {
        Configure<AbpAutoMapperOptions>(options =>
        {

            options.AddMaps<SMARTHOTELApplicationModule>();
        });
        context.Services.Configure<AliyunSmsOptions>(
           context.Services.GetConfiguration().GetSection("AliyunSms")
       );
        context.Services.AddAutoMapper(typeof(SMARTHOTELApplicationAutoMapperProfile));


    }
   


}